<%@ page pageEncoding="UTF-8" contentType="text/html;charset=utf-8"%>
<%@ taglib uri="http://www.springframework.org/security/tags"
	prefix="security"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://www.joda.org/joda/time/tags" prefix="joda" %>

<security:authorize
	ifAnyGranted="ROLE_SUPERVISOR,ROLE_33H46GZ4GDWDKQ50DWU5">
<div class="btn-group" id="btngroup">
  
</div>

	<div class="input-append">
	     
	     <input id="usedate" class="datepicker"
			type="text" />
	    		
		<button id="genRpt" class="btn btn-primary" type="button">全部生成</button>
		<span class="label label-info" id="deptLabel"></span>
	</div>
</security:authorize>
<table class="table table-bordered table-hover">
	<thead>
		<tr>
			<th>标题</th>
			<th width="150">制作者</th>
			<th width="150">部门</th>
			<th width="200">创建日期</th>
			<th width="200">修改日期</th>
			<th>管理</th>
		</tr>		
	</thead>
	<tbody>
		<c:forEach items="${pager.rows}" var="item">
			<tr>
				<td>
					<button class="btn btn-small btn-success"
						onclick="showOne('${item.id}');">
						<i class="icon-edit"></i> 编辑
					</button>
				</td>
				<td>${item.maker.username}[${item.maker.localName}]</td>
				<td>${item.department.name}</td>
				<td>
				   <joda:format value="${item.createDate}"
						pattern="yyyy-MM-dd HH:mm:ss" />
						
			    </td>
				<td>
				   <joda:format value="${item.updateDate}"
						pattern="yyyy-MM-dd HH:mm:ss" />
						
			    </td>
				<td>
					<button class="btn btn-danger btn-mini"
						onclick="removeOne('${item.id}')">
						<i class="icon-remove"></i>
					</button>
			</tr>
		</c:forEach>
	</tbody>
	<tfoot>
		<tr>
			<td colspan="4">${pager.pagination}</td>
		</tr>
	</tfoot>
</table>
<script src="scripts/apps/reporter/list.js" type="text/javascript"></script>
<script src="scripts/apps/reporter/finished/list.js"
	type="text/javascript"></script>